public class demo5 {
    public static void main(String[] args) {
        class thread extends Thread{
            @Override
            public void run() {
                System.out.println("Thread extending Thread is runing");
            }
        }
        Thread thread1 = new Thread(){
            @Override
            public void run() {
                System.out.println("Thread extending Thread with anonymous inner class is runing");
            }
        };
        Thread thread = new Thread();
        //thread.run();
        //thread1.run();
        thread.start();
        thread1.start();





    }

}
